package com.youhome.service.mapper;

import com.youhome.service.model.Zip;
import com.youhome.service.model.AssociateCity;
import com.youhome.service.model.AssociateZip;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ZipMapper {
    int deleteByPrimaryKey(String zipcode);

    int insert(Zip record);

    int insertSelective(Zip record);

    Zip selectByPrimaryKey(String zipcode);

    List<String> selectZipsByCity(String city);

    /**
     * 查询与 zipcode 相同城市下所有 zipcode 数据,不包含查询的zipcode
     * @param zip  邮编
     * @return
     */
    List<String> selectSameCityZipsByZip(String zip);

    int updateByPrimaryKeySelective(Zip record);

    int updateByPrimaryKeyWithBLOBs(Zip record);

    int updateByPrimaryKey(Zip record);

    List<Zip> selectByLikeZipCode(String zipCode);

    List<Zip> selectByLikeCity(String city);

    List<Zip> selectByBean(Zip record);

    List<AssociateZip> selectAssociateByLikeZip(String zip);

    List<AssociateCity> selectAssociateByLikeCity(String city);
}